﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTO;
using BLL;

namespace GUI
{
    public partial class News : System.Web.UI.Page
    {
        private BaiVietBLL bvBLL;

        protected void Page_Load(object sender, EventArgs e)
        {
            this.loadTinTucToDataList();
        }
        // load tin tức khác lên datalist
        private void loadTinTucToDataList()
        {
            bvBLL = new BaiVietBLL();
            List<BaiVietDTO> lstBV = new List<BaiVietDTO>();
            lstBV = bvBLL.GetListBaiViet();
            DataListTinTucCapNhat.DataSource = lstBV;
            DataListTinTucCapNhat.DataBind();
        }
    }
}